package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserClientViewDTO;
import com.financing.wap.dao.IDstUserClientViewDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_client_view  
 * 用户客户表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserClientViewDao")
public class DstUserClientViewDaoImpl extends BaseDaoImpl<DstUserClientViewDTO, java.lang.Integer> implements IDstUserClientViewDao {


	@Override
	public int insert(DstUserClientViewDTO dstUserClientView) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserClientViewSql.insert, dstUserClientView);
	}

	@Override
	public void update(DstUserClientViewDTO dstUserClientView) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserClientViewSql.update, dstUserClientView);
	}

	@Override
	public void updateForce(DstUserClientViewDTO dstUserClientView) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserClientViewSql.updateForce, dstUserClientView);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserClientViewSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserClientViewDTO> queryList(DstUserClientViewDTO dstUserClientView) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserClientViewSql.queryList, dstUserClientView);
	}

	@Override
	public int queryListCount(DstUserClientViewDTO dstUserClientView) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserClientViewSql.queryListCount, dstUserClientView);
	}

	@Override
	public DstUserClientViewDTO loadById(Integer id) throws SQLException {
		return  (DstUserClientViewDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserClientViewSql.loadById,id);
	}

	@Override
	public Class<DstUserClientViewDTO> getEntityClass() {
		return DstUserClientViewDTO.class;
	}
 	
}
